package com.xwqiang.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xwqiang.model.entity.Admin;
import com.xwqiang.model.vo.AdminVo;
import com.xwqiang.service.AdminService;
import com.xwqiang.mapper.AdminMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
* @author xwqiang
* @description 针对表【hm_admin】的数据库操作Service实现
* @createDate 2024-06-03 21:20:03
*/
@Service
@RequiredArgsConstructor
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService{

    private final AdminMapper adminMapper;

    @Override
    public AdminVo selectById(Integer id) {
        Admin admin = adminMapper.selectById(id);
        AdminVo adminVo = new AdminVo();
        BeanUtils.copyProperties(admin,adminVo);
        return adminVo;
    }
}




